﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ValidCode.aspx.cs" Inherits="ValidCode" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="robots" content="noindex,nofollow">
    <title>请输入验证码</title>
    <script type="text/javascript">
        function changeImg() {
            document.getElementById("imgValidator").src = "ImageValidator.aspx?&t=" + new Date();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="margin:20px auto;">
        请输入验证码，继续访问。<br />
        验证码：
        <img id="imgValidator" src="ImageValidator.aspx" />
                如果看不清<a href="javascript:void(0);" onclick="changeImg();">换一张</a>
        <br />
        <asp:TextBox ID="txtValidCode" runat="server" Width="70px"></asp:TextBox>
        <asp:Button ID="ButtonValid" runat="server" Text="确定" onclick="ButtonValid_Click" />
        <asp:RequiredFieldValidator ID="ReqCode" runat="server" ControlToValidate="txtValidCode" ErrorMessage="请输入验证码"></asp:RequiredFieldValidator>
        <br />
        <asp:Label ID="lblMsg" runat="server"></asp:Label>
    </div>
    </form>
</body>
</html>
